




std::string getChildElementXML() {
	std::string buf("<query xmlns=\"jabber:iq:register\">");
	if (!instructions.empty()) {
		buf.append("<instructions>").append(instructions).append("</instructions>");
	}
	if (!attributes.empty()) {
		for (std::map<std::string, std::string>::iterator it = attributes.begin();
				it != attributes.end(); it ++){
			buf.append("<").append(it->first).append(">");
			buf.append(it->second);
			buf.append("</").append(it->first).append(">");
		}
	}
	// Add packet extensions, if any are defined.
	buf.append(getExtensionsXML());
	buf.append("</query>");
	return buf;
}
